package com.catchman.controller;

import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.catchman.service.SysRoleService;
import com.catchman.entity.SysRole;
import com.catchman.vo.ResponseModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.catchman.annotation.PermInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统角色表 前端控制器
 * </p>
 *
 * @author CatchMan
 * @since 2019-05-17
**/
@Api(tags = {"系统角色表操作接口"})
@PermInfo(pval = "sys:role:*", value = "操作系统角色表的权限")
@RestController
@RequestMapping("/sysRole")
public class SysRoleController {
   private static final Logger logger = LoggerFactory.getLogger(SysRoleController.class);
   @Autowired
   private SysRoleService sysRoleService;

   /**
    * 查询分页数据
    */
   @ApiOperation(value = "分页查询系统角色表数据")
   @RequiresPermissions({"sys:role:list"})
   @GetMapping("/list")
   public ResponseModel findListByPage(@RequestParam(name = "current", defaultValue = "1") int current,
                               @RequestParam(name = "size", defaultValue = "20") int size){
       return null;
   }


   /**
    * 根据id查询
    */
   @ApiOperation(value = "根据id查询系统角色表数据")
   @RequiresPermissions({"sys:role:query"})
   @GetMapping("/getById")
   public ResponseModel getById(@RequestParam("pkid") String pkid){
       return null;
   }

   /**
    * 新增
    */
   @ApiOperation(value = "新增系统角色表数据")
   @RequiresPermissions({"sys:role:add"})
   @PostMapping("/add")
   public ResponseModel add(@RequestBody SysRole sysRole){
       return null;
   }

   /**
    * 批量删除
    */
   @ApiOperation(value = "批量删除系统角色表数据")
   @RequiresPermissions({"sys:role:delete"})
   @DeleteMapping("/del")
   public ResponseModel delete(@RequestParam("ids") List<String> ids){
       return null;
   }

   /**
    * 修改
    */
   @ApiOperation(value = "更新系统角色表数据")
   @RequiresPermissions({"sys:role:update"})
   @PutMapping("/update")
   public ResponseModel update(@RequestBody SysRole sysRole){
       return null;
   }

}

